// EG4RunAction.h -- a brief definition for the class
// Created: Jan. 27, 2019, transcribed by Asia SUN, asia.rabbit@163.com
// Last modified: Jan. 27, 2019, by Asia SUN

#ifndef EG4RunAction_h
#define EG4RunAction_h

#include "G4UserRunAction.hh"
#include "G4ThreeVector.hh"

class EG4ROOT;
class EG4Data;

// run action class
class EG4RunAction : public G4UserRunAction{
public:
  EG4RunAction(EG4ROOT *r);
  virtual ~EG4RunAction();

  virtual void BeginOfRunAction(const G4Run *) override;
  virtual void EndOfRunAction(const G4Run *) override;
  virtual void Fill(); ///< fill the tree
  EG4Data *data() const; /// return fROOT->data()

protected:
  EG4ROOT *fROOT; ///< an interface to ROOT
};

#endif
